/**
 * 
 */
package com.et114.core.exception;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

//import org.apache.struts.util.ModuleException;

/**
 * @author guanhw
 */
public class CheckException extends java.lang.RuntimeException {
	private static final long serialVersionUID = 2265834732511033200L;
	private Log log = LogFactory.getLog( getClass() );
	private Throwable _rootCause;
	private String goBackUrl ; 
	/**
	 * 
	 */
	public CheckException() {
		super();
	}

	/**
	 * 
	 * @param message
	 */
	public CheckException( String message ) {
		super( message );
	}

	/**	 
	 * @param cause
	 */
	public CheckException( Throwable cause ) {
		super( cause );
	}

	/*
	 * 
	 * @param message
	 * @param cause
	 */
	public CheckException( String message , Throwable cause ) {
		super( message );
		if ( /*cause instanceof Exception ||*/ cause instanceof CheckException ) {
			_rootCause = ( ( CheckException ) cause ) . _rootCause;
		} else {
			_rootCause = cause;
		}
		log.error( message , cause );
	}

	public String getGoBackUrl ( ) {
		return goBackUrl;
	}

	public void setGoBackUrl ( String goBackUrl ) {
		this.goBackUrl = goBackUrl;
	}
}
